package com.yyge.dto;

public enum ResultCode {
//    OK(20000, "操作成功"),
//    FAILURE(50000,"操作失败"),
//    PARAM_IS_INVALID(10100,"参数无效"),
//    PARAM_IS_BLANK(10200,"参数为空"),
//    PARAM_TYPE_BIND_ERROR(10300,"参数类型错误"),
//    PARAM_NOT_COMPLETE(10400,"参数缺失"),
//    ILLEGAL_TOKEN(50800,"非法的令牌"),
//    TOKEN_EXPIRED(51400,"令牌已失效"),
//    USER_NOT_LOGGED_IN(51500, "用户未登录"),
//    USER_LOGIN_ERROR(51500, "用户名或密码错误"),
//    USER_ACCOUNT_FORBIDDEN(51600, "账户被禁用"),
//    USER_NOT_EXIST(51700, "用户名不存在"),
//    USER_HAS_EXIST(51800, "用户名已存在"),

    // 新增
     SUCCESS (200 ,"操作成功 "),
     ERROR (500 ,"操作失败 "),
     NOT_FOUND (404 ,"请求错误 "),

     SYSTEM_CODE_INVALID(1000, "验证码失效"),
     SYSTEM_ACCOUNT_INVALD (1001,"账户已禁用 "),
     SYSTEM_CODE_ERROR(1000, "验证码错误"),
     SYSTEM_TOKEN_INVALID(10002,"令牌异常"),
     SYSTEM_NEED_TOKEN(1003,"无权访问"),
     SYSTEM_UPLOAD_TYPE_ERROR(1004,"上传格式不支持"),
     SYSTEM_UPLOAD_FILE_ERROR(1005,"上传文件不能为空"),
     SYSTEM_UPLOAD_FILE_SIZE_ERROR(1005,"上传文件大小非法"),
     SYSTEM_TKOKEN_EXPIRES(611,"Tkoen令牌过期"),
     SYSTEM_NEED_TKOKEN(1006,"非管理员无权访问"),
     SYSTEM_REGISTER_CODE_ERROR(1007,"验证码错误"),
     SYSTEM_REGISTER_CODE_EXPIRE(1008,"验证码已过期"),
     SYSTEM_REGISTER_ERROR(1009,"注册异常"),

     SYSTEM_SERVICE_ADD_ERROR(1010,"新增失败"),
     SYSTEM_SERVICE_DELETE_ERROR(1011,"删除失败"),
     SYSTEM_SERVICE_MODIFY_ERROR(1012,"修改失败"),
     GOODS_NOT_EXISTS (2000,"商品不存在 "),
     GOODS_NOT_ON_SELL (2001,"商品未上架 "),
     DISH_EXISTS(5001, "菜品已重复"),
     ACCOUNT_NOT_EXISTS(4001, "账户不存在"),
     ACCOUNT_INVALID_PWD(4002, "密码错误"),
     ACCOUNT_INVALID(4003, "账户被禁用"),
     TOKEN_INVALID(4004,"验证Token异常");/*修改 验证Token异常*/

    final Integer code;
    final String message;

    ResultCode(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public String  getMessage() {
        return message;
    }
}

